package com.centit.springbootdemo04.enable;

import com.centit.springbootdemo04.DI.TestDiConfiguration;
import com.centit.springbootdemo04.configuration.TestConfiguration;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author zhao_jx
 * @date 2020/7/5 18:11
 */
public class CentitDefineImportSelector  implements ImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        // 在这里可以去加载所需的配置类 或者 通过某种机制去完成指定路径的配置类的扫描
        return new String[]{TestConfiguration.class.getName(), TestDiConfiguration.class.getName()};
    }
}
